package cn.lj.dao;

import cn.lj.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lj
 * @Description:
 * @date 2020-11-29 14:04
 * @QQ 851477108
 */

@Mapper
@Repository
public interface CommentDao {
    //根据创建时间倒序来排
    List<Comment> findByBlogIdAndParentCommentNull(@Param("blogId") Long blogId, @Param("blogParentId") Long blogParentId);

    //查询父级对象
    Comment findByParentCommentId(@Param("parentCommentId")Long parentcommentid);

    int saveComment(Comment comment);
}
